function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);/* two1 */
var con=document.getElementById("con_"+name+"_"+i);/* con_two_1 */
menu.className=i==cursel?"on":"";
con.style.display=i==cursel?"block":"none";
}
}

function browserRedirect() {
      var sUserAgent = navigator.userAgent.toLowerCase();
      var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
      var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
      var bIsMidp = sUserAgent.match(/midp/i) == "midp";
      var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
      var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
      var bIsAndroid = sUserAgent.match(/android/i) == "android";
      var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
      var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
      if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
        //phone
        var oUrl=window.location.href;
	    var subStr=new RegExp('www');
	    if(oUrl.indexOf('www')>=0){
	    	var result=oUrl.replace(subStr,"m");
	    	window.location=result;
	    }
      } else {
        //pc
      }
    }

if(window.location.hash=='#pc'){}else{browserRedirect();} 

			
			function createSwiper(index){
				  var mySwiper = new Swiper ('.swiper-container'+index, {
						loop: true,
						autoplay: true,
						slidesPerView: "auto",
						centeredSlides:true,
						pagination: {
									el: '.swiper-pagination'+index,
									clickable: true,
									renderBullet: function (index, className) {
									  return '<span class="' + className + '">' + (index + 1) + '</span>';
									},
								  },
						lazy: {
							loadPrevNext: true,
						},
						observer:true,
						observeParents:true,
						autoplayDisableOnInteraction : false,
						autoplay:{
							enabled: true,
							delay: 3000,
							disableOnInteraction: false,
						},
					});
				  return mySwiper;  
			}
			






$(function () {
	
	
if ($(".swiper-container0").length > 0){  
			
			createSwiper(0)

}
	
	////////////
	
	
	
	
		$(".btn-top").click(function() {
		$("html, body").animate({
			"scroll-top": 0
		}, "fast");
	});
///////////

	$(window).scroll(function() { //bug
		var _top = $(window).scrollTop();
		if (_top > 200) {
			$(".btn-top").slideDown();
		} else {
			$(".btn-top").slideUp();
		}
		
	});
	
/////////
	

	
	
	  $(".zb li").click(function(){
var e = $(this).index();
$(this).siblings().removeClass("on"),
$(this).addClass("on"),
$(".matchb").css("display",'none');
$(".matchb:eq(" + e + ")").css("display",'block');
});
	
	
	

 	
///////////////	
	
	
var streamBtm='<a href="https://tv.cctv.com/live/cctv5/" target="_blank"><p title="CCTV5">CCTV5</p></a><a href="https://www.zhibo8.com/" target="_blank"><p title="文字直播">文字直播</p></a><a href="https://live.titan007.com/" target="_blank"><p class="link-hide" title="比分直播" style="display: none;">比分直播</p></a><a href="https://live.leisu.com/" target="_blank"><p class="link-hide" title="动画直播" style="display: none;">动画直播</p></a><a href="https://sports.qq.com/kbsweb/" target="_blank"><p class="link-hide" title="腾讯体育" style="display: none;">腾讯体育</p></a><a href="https://www.miguvideo.com/p/schedule/" target="_blank"><p class="link-hide" title="咪咕体育" style="display: none;">咪咕体育</p></a><a href="https://sports.iqiyi.com/" target="_blank"><p class="link-hide" title="爱奇艺体育" style="display: none;">爱奇艺体育</p></a><a href="https://www.ppsport.com/" target="_blank"><p class="link-hide" title="PP体育" style="display: none;">PP体育</p></a><a href="https://sports.sina.com.cn/" target="_blank"><p class="link-hide" title="新浪体育" style="display: none;">新浪体育</p></a>';
$(".streamBtm").append(streamBtm);
///////////////////	
$(".viewMore").click(function () {
if ( $(this).hasClass("show"))
{
$(this).removeClass("show");
$(this).text("更多");
$(this).prev().find('.link-hide').css("display",'none');
}
 else
{
$(this).addClass("show").siblings().removeClass("show");
$(this).text("收起");
$(this).prev().find('.link-hide').css("display",'block');
}
});	
///////////	



$(".hover-top li").hover(function(){
	var e = $(this).index();
	$(this).siblings().removeClass("on");
	$(this).addClass("on");
	$(this).parent().parent().parent().find(".hover-sub").hide();
	$(this).parent().parent().parent().find(".hover-sub:eq(" + e + ")").show();
});


	
});